Introduction

The central theme of this project will be to assess the morphological and allometric differences between ecomorphs within the genus Anolis. First coined by the famous evolutionary biologist and herpetologist Ernest Williams, the term ecomorph describes a group of species, perhaps not sharing a most recent common ancestor, with a similar ecological niche and behavior within the context of this niche. His model for this concept was the genus Anolis, although the ecomorph construct has been widely applied to many other species (think reef fish and Darwin’s Finches) The morphological and ecological data were retrieved from a recent study of allometry and ecomorphology of anoles (geckos, too) by Hagey et al. (2017). Additionally, the tree data comes from a study of the phylogenetic relationships of anoles by Poe et al. (2017).

Our tasks will be to:

  1. Visualize how hind limb length varies with size (i.e., allometry!).
  2. Visualize and asses how hind limb length vs. size relationship covary with ecological niche.
  3. Learn more complex operations in ‘ggplot’ than we’ve undertaken so far.
  4. Evaluate this hindlimb-size relationship using standard frequentist models within and without a phylogenetic context.
  5. Using an information theory approach, assess the fit of phylogenetically corrected models of hind-limb variation under different modes of character evolution.
An anolis lizard

Methods

  1. First we loaded all the data where the morphological and ecological data was retrieved from Hagey et al. (2017) and the tree data comes from Poe et al. (2017).
  2. Next, we filtered the data, removing any rows is the tibble for which the Ecomoroph value was “U” or “CH” and we removed any missing values.
  3. We then mutated our collective tibble containing morphological and ecological data so that we changed our columns containing size and ecological data to log transformations of their values, each for SVL, HTotal, PH and ArbPD. These are continuous data, i.e., they are not discrete and log transformation converts these data to proportional representations.
  4. Then, we visualized our log-transformed data using the ggplot call, specifying SVL for the x values and HTotal for the y, then added point and line (of type “lm”) geometries to the plot and colored by Ecomorph (Fig. 1).
  5. Next we performed some PGLS under two different models: both with simple regression models that doesn’t include ecomorph and then models that do. We used AICc scores to determine which one was the most accurate.
  6. Finally, we used a boxplot to visualize our most accurate PGLS model and it’s calculated residuals (Fig. 2)

Results

anole <- read_csv("anole.dat.csv")
## Rows: 70 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): Species
## dbl (2): SVL, HTotal
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
anole.eco <- read_csv("anole.eco.csv")
## Rows: 70 Columns: 5
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): Species, Ecomorph, Ecomorph2
## dbl (2): PH, ArbPD
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
anole.tree <- read.tree("anole.tre")
anole2 <- anole%>%
left_join(anole.eco)%>%
  filter(!Ecomorph%in%c("U","CH"))%>%
  na.omit()
## Joining, by = "Species"
anole.log <- anole2%>%
  mutate_at(c("SVL", "HTotal","PH","ArbPD"),log)
### phylogenetic GLS models

#PGLS under BM, no ecomorph
pgls.BM1 <- gls(HTotal ~SVL, correlation = corBrownian(1,phy = anole.tree,form=~Species),data = anole.log, method = "ML")

#PGLS under BM, w ecomorph
pgls.BM2 <- gls(HTotal ~SVL * Ecomorph2, correlation = corBrownian(1,phy = anole.tree,form=~Species),data = anole.log, method = "ML")

#PGLS under OU, no ecomorph
pgls.OU1 <- gls(HTotal ~SVL, correlation = corMartins(0,phy = anole.tree,form=~Species),data = anole.log, method = "ML")

#PGLS under OU, w, ecomorph
pgls.OU2 <- gls(HTotal ~SVL * Ecomorph2, correlation = corMartins(0,phy = anole.tree,form=~Species),data = anole.log, method = "ML")
#AIC operations
anole.phylo.aic <- AICc(pgls.BM1,pgls.BM2,pgls.OU1,pgls.OU2)
anole.phylow.aicw <- aicw(anole.phylo.aic$AICc)
anole.phylow.aicw%>%
  kable(caption = "AIC values from phylogenic PGLS models from top to bottom as: PGLS under BM,= no ecomorph , PGLS under BM w ecomorph , PGLS under OU no ecomorph , and PGLS under OU w ecomorph")
AIC values from phylogenic PGLS models from top to bottom as: PGLS under BM,= no ecomorph , PGLS under BM w ecomorph , PGLS under OU no ecomorph , and PGLS under OU w ecomorph
fit delta w
-63.66118 29.319176 0.0000004
-92.98036 0.000000 0.9827289
-57.31864 35.661714 0.0000000
-84.89770 8.082653 0.0172706
anole.log%>%
  ggplot(aes(HTotal,SVL,col=Ecomorph2))+geom_point()+geom_smooth(method="lm")
## `geom_smooth()` using formula 'y ~ x'
Figure 1. Regression Plot showing the relationship of snout vent length to mean total hind-limb length based on unique ecomorphological destinations

Figure 1. Regression Plot showing the relationship of snout vent length to mean total hind-limb length based on unique ecomorphological destinations

#add phylo-corrected residuals
anole.log <- anole.log%>%
  mutate(phylo.res=residuals(pgls.BM2))
#plot residuals
p.eco.phylo <- anole.log%>%
ggplot(aes(x=Ecomorph2,y=phylo.res)) +geom_boxplot() +stat_summary(fun=mean, geom="point", size=3)

print(p.eco.phylo)
Figure 2. Boxplot of phylogenetically corrected hindlimb residuals versus anole ecomorph

Figure 2. Boxplot of phylogenetically corrected hindlimb residuals versus anole ecomorph

Discussion

From the AIC results, we con safely say that a phyloggnetically corrected regression model that includes Ecomorph2 with traits evolving under BM is the best fit. The OU models that specify a pull to some global optimum are rejected. We can interpret this to mean that the traits have evolved randomly, but randomly within each lineage. With our boxplot plot before us with the residuals from PGLS we know to be the best fit, we can see that the residuals condense quite a bit when we consider phylogeny. In other words, there was quite a bit of phylogenetic signal in our hindlimb-SVL data. That is, compared to all the other anoles, it’s a rather unremarkable group in terms of relative hindlimb size.

Author Contributions

All group members completed the assignment in full on one’s own in order to make sure we all had a comprehensive understanding. We then compared code and answered eachothers questions to finish the project.

CPK Comments

Looks awesome. Super slick! Congrats and well done. 15/15. ## References

Hagey, Travis J, Scott Harte, Mathew Vickers, Luke J Harmon, and Lin Schwarzkopf. 2017. “There’s More Than One Way to Climb a Tree: Limb Length and Microhabitat Use in Lizards with Toe Pads.” PloS One 12 (9): e0184641.
Poe, Steven, Adrian Nieto-Montes de Oca, Omar Torres-Carvajal, Kevin De Queiroz, Julián A Velasco, Brad Truett, Levi N Gray, et al. 2017. “A Phylogenetic, Biogeographic, and Taxonomic Study of All Extant Species of Anolis (Squamata; Iguanidae).” Systematic Biology 66 (5): 663–97.